package com.mpgame.core.effect;

import com.fasterxml.jackson.databind.JsonNode;
import com.mpgame.core.model.Monster;
import com.mpgame.core.status.StatusBase;
import com.mpgame.core.utils.MReport;

/** 技能效果：遭受异常状态 */
public class StatusEffect extends Effect{
    private StatusBase status;
    @Override
    protected void innerParseJson(JsonNode params){
        StatusBase statusBase = StatusBase.parseStatusJson(params);
        this.status = statusBase;
    }
    @Override
    protected void take(Monster target){
        target.addStatus(status);
        MReport.Report(target.getIdentifier() + "的技能 " + target.getCurSkill().getIdentifier() + " 的特殊效果异常状态生效了！");
    }
}
